from blog import db


class Article(db.Model):
    __tablename__ = 'article'  # 表名

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50))
    contents = db.Column(db.Text)
    type = db.Column(db.Integer)
    post_time = db.Column(db.DateTime)

    def __repr__(self):
        return '<Article %r>' % self.name

